﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace RyanLam.NET.Core.Controllers
{
   public static class Functions
    {

       /// <summary>
       /// Convert the value of this instance to its equivalent guid representaion.
       /// </summary>
       /// <param name="s">The string input for convert to guid.</param>
       /// <returns></returns>
       public static Guid ToGuid(this string s)
       {
           if (String.IsNullOrEmpty(s))
               s = "00000000-0000-0000-0000-000000000000";
           Guid returnValue = default(Guid);
           returnValue = XmlConvert.ToGuid(s);
           return returnValue;
       }
    }
}
